{extend name="default/base" /}
{block name="css"}
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/mmgrid/mmGrid.css?v={$v}" />
{/block}
{block name="main"}
<style>
.layui-layer-btn .layui-layer-btn0{background:#e45050;border-color:#e45050;}
.webuploader-container{width:80px;height:30px;overflow: hidden;float:right;margin:0 5px 0px 5px;}
.webuploader-container .webuploader-pick{padding:7px 10px;height: 28px;line-height: 16px;font-size: 13px;}
</style>
<link rel="stylesheet" type="text/css" href="__STATIC__/plugins/webuploader/webuploader.css?v={$v}" />
<input type='hidden' id='vid' value='{$id}'/>
<div class="wst-toolbar">
  <select id='isUse' class="s-query">
             <option value='-1'>卡券状态</option>
             <option value='0'>未使用</option>
             <option value='1'>已下单</option>
          </select>
    <input type="text" name="cardNo" id="cardNo" class="s-query" placeholder='卡券号'/>
    <a class="s-btn btn btn-primary" onclick="loadGrid()"><i class="fa fa-search"></i>查询</a>
    <div id='importBtn' style='float:right;'>导入卡券</div>
    
    <a href='javascript:void(0);' onclick="delCard({$id},1)" class="s-del btn btn-danger f-right" style="margin-right: 5px;"><span><i class="fa fa-trash-o"></i>删除</span></a>
    <a href='__STATIC__/template/goodsvirtuals.xls' class="btn btn-primary f-right" target='_blank' style="margin-right: 5px;"><i class="fa fa-download"></i>下载模板</a>
      <a href='javascript:void(0);' onclick="editCard(0)" class="s-add btn btn-success f-right" style="margin-right: 5px;"><span><i class="fa fa-plus"></i>新增</span></a>
</div>
<div class='wst-grid'>
    <div id="mmg" class="mmg"></div>
    <div id="pg" style="text-align: right;"></div>
</div>
{/block}  
{block name="js"}
<script src="__STATIC__/plugins/mmgrid/mmGrid.js?v={$v}" type="text/javascript"></script>
<script type='text/javascript' src='__STATIC__/plugins/webuploader/webuploader.js?v={$v}'></script>
<script type='text/javascript' src='__SHOP__/goodsvirtuals/virtuals.js?v={$v}'></script>
<script>
$(function(){stockByPage({$id},{$p})})
</script>
{/block}